<template>
  <i class="iconfont icon-container" :class="fontClass"></i>
</template>

<script>
// 类名映射
const classMap = {
  home:"icon-zhuye",
  success:"icon-chenggong",
  error:"icon-cuowu",
  close:"icon-guanbi1",
  warn:"icon-jinggao",
  info:"icon-xiangqing",
  blog:"icon-blog",
  code:"icon-code",
  about:"icon-about",
  weixin:"icon-weixin",
  mail:"icon-email",
  github:"icon-github",
  qq:"icon-QQ",
  arrowUp:"icon-shangjiantou",
  arrowDown:"icon-xiajiantou",
  empty:"icon-empty",
  chat:"icon-duzheliuyan",
};
export default {
  props: {
    type: {
      type:String,
      require:true,
    }
  },
  computed: {
    fontClass(){
      return classMap[this.type];
    }
  }
  
}
</script>

<style scoped>
  @import"//at.alicdn.com/t/c/font_4977900_p2xmr8hilhi.css";
  .iconfont {
    color: inherit;
    font-size: inherit;
  }
</style>